package com.weblog.auth.client;

import com.weblog.auth.client.factory.UserFallBackFactory;
import com.weblog.auth.interceptor.FeignInterceptor;
import entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author MaoLin Wang
 * @date 2019/9/2215:37
 */
@FeignClient(value = "weblog-user",fallbackFactory = UserFallBackFactory.class,configuration = FeignInterceptor.class)
public interface UserClient {

    /**
     * 根据id查询用户名
     * @param id
     * @return
     */
    @GetMapping("/user/client/{id}")
    Result findUserNameById(@PathVariable String id);


}
